const profile = {
	// active: "dev",
	active: "prod",
}

const UserSetting = {
	// 后端返回值修改
	setUserLoginResult(loginResult) {
		let res = loginResult;
		if (profile.active === "dev") {
			// res = JSON.parse(JSON.stringify(loginResult));
			res.code = 200
			res.meta.status = 200
			if (res.message == null) {
				res.message = {
					// token: "fade-token"
					// token: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjIzLCJpYXQiOjE1NjQ3MzAwNzksImV4cCI6MTAwMTU2NDczMDA3OH0.YPt-XeLnjV-_1ITaXGY2FhxmCe4NvXuRnRB8OMCfnPo"
					token: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjIzLCJpYXQiOjE1NjQ3MzAwNzksImV4cCI6MTAwMTU2NDczMDA3OH0.YPt-XeLnjV-_1ITaXGY2FhxmCe4NvXuRnRB8OMCfnPo"
				}
			} else
				res.message.token = "fade-token"
		}
		return res;
	},
	// 创建订单虚拟回复
	setCreateOrderRes(res) {
		if (profile.active === "dev") {
			res.meta.status = 200
			if (res.message == undefined) {
				res.message = {
					order_number: 1000
				}
			}

		}
	},
	// 预付订单虚拟回复
	setReqOrderRes(res) {
		if (profile.active === "dev") {
			res.meta.status = 200
			if (res.message == undefined) {
				res.message = {
					pay: ""
				}
			}

		}
	}
}

export {
	profile,
	UserSetting
}